<?php include '../../../entries/restful.php';
/**
 *  维修列表
 */
class Surface extends Restful{

    public function action(){

        $user = json_decode($this->session->getItem('user'),true);
        $user_id = $user['id'];
        $cmt_id = $user['cmt_id'];

        $sql = 'select * from prop_fix where worker_id = ? and cmt_id = ? order by state';
        $arg = [$user_id,$cmt_id];

        $info = Mdb::query(MDB_MAIN,$sql,$arg);
        return Res::ok($info);
    }
}

new Surface();